package com.cqupt.controller;

import com.cqupt.service.SmsService;
import com.cqupt.model.vo.Result;
import com.cqupt.model.vo.ResultCodeEnum;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@Tag(name = "SMS模块")
@RequestMapping("/api/sms")
public class SmsController {


    @Resource
    private SmsService smsService;


    @GetMapping("/sendCode")
    @Operation(summary = "发送手机验证码接口")
    public Result sendValidateCode(@RequestParam String phone) {
        smsService.sendCode(phone);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
